package com.doit.day01;

public class Test {
    public static void main(String[] args) {

/*        MyFun myFun = new MyFun();
        Integer res = myFun.apply(1, 2, 3, 4);
        System.out.println(res);*/
        MyFunction4<Integer, Integer, Integer, Integer, Integer>  myFun =  new MyFunction4<Integer, Integer, Integer, Integer, Integer>() {
            @Override
            public Integer apply(Integer integer, Integer integer2, Integer integer3, Integer integer4) {
                return integer+integer2+integer3+integer4;
            }
        };

        Integer apply = myFun.apply(1, 2, 3, 4);
        System.out.println(apply);
/*        MyFunction0 myFunction0 = new MyFunction0() {
            @Override
            public void apply() {
                System.out.println("华哥真有钱！！！！");
            }
        };

        myFunction0.apply();*/


    }
}

class MyFun implements MyFunction4<Integer,Integer,Integer,Integer,Integer>{
    @Override
    public Integer apply(Integer integer, Integer integer2, Integer integer3, Integer integer4) {
        return integer+integer2+integer3+integer4;
    }
}